package com.tyz.hellocst;

import android.app.Application;
import android.view.View;

/**
 * 全局上下文
 */

public class AppContext extends Application {

    private static boolean viewPagerIsAutoPlay = true;
    private static int relativeLayoutVisibility = View.VISIBLE;
    private static String userName = new String();
    private static String name = new String();
    private static String userMd5 = new String();

    private static AppContext appContext;

    @Override
    public void onCreate() {
        super.onCreate();
        appContext = this;
    }

    public static AppContext getAppContext() {
        return appContext;
    }

    public static void setViewPagerIsAutoPlay(boolean viewPagerIsAutoPlay) {
        AppContext.viewPagerIsAutoPlay = viewPagerIsAutoPlay;
    }

    public static boolean isViewPagerIsAutoPlay() {
        return viewPagerIsAutoPlay;
    }

    public static void setRelativeLayoutVisibility(int relativeLayoutVisibility) {
        AppContext.relativeLayoutVisibility = relativeLayoutVisibility;
    }

    public static int getRelativeLayoutVisibility() {
        return relativeLayoutVisibility;
    }

    public static void setUserName(String userName) {
        AppContext.userName = userName;
    }

    public static String getUserName() {
        return userName;
    }

    public static void setName(String name) {
        AppContext.name = name;
    }

    public static String getName() {
        return name;
    }

    public static void setUserMd5(String userMd5) {
        AppContext.userMd5 = userMd5;
    }

    public static String getUserMd5() {
        return userMd5;
    }


}
